1. Field of the Invention
The present invention relates to an audio data compression/expansion apparatus that compresses audio data when audio sound is recorded, and to expands the compressed data when audio sound is reproduced and a digital filter used for this audio data compression/expansion apparatus.
2. Description of the Related Art
A Finite Impulse Response (FIR) type digital filter is constructed so that output data Y(n) will be produced by convoluting input data X(n) and impulse responses, as expressed by equation (1).                               Y          ⁡                      (            n            )                          =                              ∑                          k              =              0                                      N              -              1                                ⁢                                    h              ⁡                              (                k                )                                      ·                          X              ⁡                              (                                  n                  -                  k                                )                                                                        (        1        )            
where, h(k) is a filter coefficient and N is the number of taps. When transformed with regard to Z, the equation (1) will be as follows:                               H          ⁡                      (            z            )                          =                              ∑                          n              =              0                                      N              -              1                                ⁢                                    h              ⁡                              (                n                )                                      ·                          Z                              -                n                                                                        (        2        )            
The equation (2) will be further transformed as follows:                               H          ⁡                      (                          ⅇ              jω                        )                          =                              ∑                          n              =              0                                      N              -              1                                ⁢                                    h              ⁡                              (                n                )                                      ·                          ⅇ                                                -                  jω                                ⁢                                  xe2x80x83                                ⁢                n                                                                        (        3        )            
The equation (3) determines a frequency response. Assuming that xcfx89=2xcfx80k/N, the equation (3) will be as follows:                               H          ⁡                      (                          ⅇ              jω                        )                          -                              ∑                          n              =              0                                      N              -              1                                ⁢                                    h              ⁡                              (                n                )                                      ·                          ⅇ                              j2π                ⁢                                  xe2x80x83                                ⁢                                  nk                  /                  N                                                                                        (        4        )            
This equation (4) may be regarded as an expression of Discrete Fourier Transformation (DFT). Thus, the filter coefficient h(k) is obtained through Inverse Discrete Fourier Transformation (IDFT) of the frequency characteristic given by the equation 4.
FIG. 9 shows the circuit of a standard FIR type digital filter.
In this filter circuit, a plurality of delay elements 1, which may be, for example, shift registers, are connected in series with each other and each of these elements delays the input data X(n) a certain period T. This circuit also has a plurality of multipliers 2, the first multiplier connected to the input data X(n) carrying line to the first delay element 1 and the remaining connected to the output line from each delay element 1. The first multiplier 2 multiplies the input data X(n) by a given filter coefficient h(k) and the remaining multipliers 2 multiply the output from each delay element 1 by the same filter coefficient h(k). In this way, the input data X(n) is convoluted with the impulse responses.
A total sum adder 3, included in this circuit, sums up the outputs from all the multipliers 2, that is, the input data X(n) and the outputs from all delay elements 1 after being multiplied by the predetermined filter coefficient h(k), and produces output data Y(n). Consequently, the input data X(n) has now been processed, subject to the arithmetic operation in compliance with the above-mentioned equation (1).
Because an array of delay elements 1 and multipliers 2, corresponding to the number of taps N are required, this type of digital filter has a problem that its entire circuit size becomes larger as the number of the taps increases. Therefore, a digital filter using a stored program method has been proposed which stores time-series input data in a memory once and sequentially multiplies the input data by the filter coefficient after reading it from the memory, while accumulating the product of each multiplication.
FIG. 10 shows a block diagram representing the digital filter using the stored program method.
In this block diagram, a RAM 11 sequentially stores time-series input data X(n) that has been input to it from moment to moment. A plurality of filter coefficients h(k) are stored in a ROM 12. Input data X(n) stored in the RAM 11 is read out at its arithmetic step and from the ROM 12 a step-specific filter coefficient h(k) with a value of k incrementing step by step is read out, where k corresponds to the k described in equation (1). Then, a multiplier 13 multiplies the input data X(nxe2x88x92k) read from the RAM 11 by the filter coefficient h(k) read from the ROM 12.
An accumulator 14, consisting of an adder 15 and a register 16, accumulates the product of each multiplication executed by the multiplier 13. Specifically, the adder 15 adds the output from the multiplier 13 and the output from the register 16 and the resultant sum is stored into the register 16 again. In this way, the product of each multiplication executed by the multiplier 13 is heated up sequentially. An output register 17 receives an accumulation value output from the accumulator 14 and outputs it as output data Y(n).
After reading the input data X(n) and the filter coefficient h(k) sequentially from the RAM 11 and ROM 12, respectively, the FIR type digital filter repeats the product sum arithmetic operation and produces the output data Y(n), thus processing the arithmetic of equation (1). This type of a digital filter does not become large, even if the filter circuit includes a large number of taps N.
One digital filter is assumed to have the first filter coefficient h1(n), whereas another digital filter is assumed to have the second filter coefficient h2(n) given by the following equation:
h2(n)=(xe2x88x921)nxc2x7h1(n)xe2x80x83xe2x80x83(5)
The latter digital filter is referred to as a mirror filter because of its frequency response characteristics. The arithmetic relation of this filter with Z transformation can be expressed as follows:                                                                                           H                  2                                ⁡                                  (                  z                  )                                            =                                                ∑                                      n                    =                                          -                      ∞                                                        ∞                                ⁢                                                      Z                                          -                      n                                                        ·                                                            h                      2                                        ⁡                                          (                      n                      )                                                                                                                                              =                                                ∑                                      n                    =                                          -                      ∞                                                        ∞                                ⁢                                                      Z                                          -                      n                                                        ·                                                            (                                              -                        1                                            )                                                              -                      n                                                        ·                                                            h                      1                                        ⁡                                          (                      n                      )                                                                                                                                              =                                                H                  1                                ⁡                                  (                                      -                    Z                                    )                                                                                        (        6        )            
When we consider the frequency response characteristics of the filter, the following equation is obtained:
h2(n)=xcex8ixcfx80nxc2x7h1(n)xe2x80x83xe2x80x83(7)
When equation (7) is assigned to equation (6), the following equation is derived:
H2(xcex8ixcfx89)=H1(eixcfx89+ixcfx80)xe2x80x83xe2x80x83(8)
From equation (8), the frequency response characteristics of the mirror filter are symmetric with regard to xcfx80/2. Because xcfx80/2 is xc2xc of the sampling period, the mirror filter is called a Quadrature Mirror Filter (QMF). A QMF of this kind is detailed in a publication xe2x80x9cIEEE Transactions on Acoustics Speech and Signal Processingxe2x80x9d (Vol. ASSP-32, No. 3, June, 1984, pp. 522-531).
A separation filter in which the above-mentioned QMF separates the input data into frequency components in different bands is constructed to produce two output data Ya(n) and Yb(n) which have been separated from the input data X(n). This filter convolutes the input data X(n) with the impulse responses and executes adding and subtracting calculations on the data obtained from the convolution process, as expressed by equations (9) and (10).                                                                         Ya                ⁡                                  (                  n                  )                                            =                              xe2x80x83                            ⁢                                                                    ∑                                          k                      =                                              N                        -                        1                                                              0                                    ⁢                                                            h                      ⁡                                              (                                                  2                          ⁢                          k                                                )                                                              ·                                          X                      ⁡                                              (                                                                              2                            ⁢                            n                                                    -                                                      2                            ⁢                            k                                                                          )                                                                                            -                                                                                                        xe2x80x83                            ⁢                                                ∑                                      k                    =                                          N                      -                      1                                                        0                                ⁢                                                      h                    ⁡                                          (                                                                        2                          ⁢                          k                                                +                        1                                            )                                                        ·                                      X                    ⁡                                          (                                                                        2                          ⁢                          n                                                -                                                  2                          ⁢                          k                                                +                        1                                            )                                                                                                                              (        9        )                                                                                    Yb                (                n                )                            =                              xe2x80x83                            ⁢                                                                    ∑                                          k                      =                                              N                        -                        1                                                              0                                    ⁢                                                            h                      (                                              2                        ⁢                        k                                            )                                        ·                                          X                      ⁡                                              (                                                                              2                            ⁢                            n                                                    -                                                      2                            ⁢                            k                                                                          )                                                                                            +                                                                                                        xe2x80x83                            ⁢                                                ∑                                      k                    =                                          N                      -                      1                                                        0                                ⁢                                                      h                    ⁡                                          (                                                                        2                          ⁢                          k                                                +                        1                                            )                                                        ·                                      X                    ⁡                                          (                                                                        2                          ⁢                          n                                                -                                                  2                          ⁢                          k                                                +                        1                                            )                                                                                                                              (        10        )            
FIG. 11 shows a block diagram representing the structure of the separation filter in which data separation into different frequency bands is performed according to equations (9) and (10).
As shown in this block diagram, a plurality of delay elements 21 are serially connected and each of these elements delays the input data X(n) a certain period T. Of a plurality of first multipliers 22, one is connected to the input data X(n) carrying line to the first delay element 21 and the remaining multipliers 22 are connected to the output line from each of the delay elements 21 located in the even number stages. The first multipliers 22 multiply the input data X(n) and the outputs from these delay elements 21 by a filter coefficient h(2k). There are also a plurality of second multipliers 23 connected to the output line from each of the delay elements 21 located in the odd number stages. The second multipliers 23 multiply the outputs of these delay elements 21 by a filter coefficient h(2k+1). In this way, the input data X(n) is convoluted with the impulse responses.
A first total sum adder 24 sums up the outputs from all first multipliers 22 and outputs intermediate data An. On the other hand, a second total sum adder 25 sums up the outputs from all second multipliers 23 and outputs intermediate data Bn.
A subtracter 26 subtracts the intermediate data Bn supplied by the second total sum adder 25 from the intermediate data An supplied by the first total sum adder 24, and outputs the first output data Ya(n). An adder 27 adds the intermediate data An supplied by the first total sum adder 24 and the intermediate data Bn supplied by the second total sum adder 25 and outputs the second output data Yb(n). In this way, the filter circuit accomplishes the arithmetic operation in compliance with the equations (9) and (10).
On the other hand, a synthesis filter in which the above-mentioned QMF synthesizes the input data frequency components existing in separate bands is constructed to produce an output data Y(n) into which the input data Xa(n) and Xb(n) are combined. This filter convolutes the values obtained by adding and subtracting calculations on the first and the second input data Xa(n) and Xb(n) with the impulse responses, as expressed by equations (11) and (12).                               Y          ⁡                      (                          2              ⁢              n                        )                          =                              ∑                          k              =              0                                      N              -              1                                ⁢                                    h              ⁡                              (                                  2                  ⁢                  k                                )                                      ⁢                          {                                                Xa                  ⁡                                      (                                          n                      -                      k                                        )                                                  ⁢                                  Xb                  ⁡                                      (                                          n                      -                      k                                        )                                                              }                                                          (        11        )                                          Y          ⁡                      (                                          2                ⁢                n                            +              1                        )                          =                              ∑                          k              =              0                                      N              -              1                                ⁢                                    h              ⁡                              (                                                      2                    ⁢                    k                                    +                  1                                )                                      ⁢                          {                                                Xa                  ⁡                                      (                                          n                      -                      k                                        )                                                  +                                  Xb                  ⁡                                      (                                          n                      -                      k                                        )                                                              }                                                          (        12        )            
FIG. 12 shows a block diagram representing the structure of the synthesis filter in which the synthesis of separate frequency bands is performed in accordance with the equations (11) and (12).
AS shown in this block diagram, a subtracter 31 subtracts the second input data Xb(n) from the first input data Xa(n) and an adder 32 adds the first and the second input data Xa(n) and Xb(n). A changeover switch 33 alternately switches the output between the output from the subtracter 31 and the output from the adder 32.
A plurality of delay elements 34 are serially connected and each of these elements delays the output from the subtracter 31 or the output from the adder 32 a certain period T. Of a plurality of first multipliers 35, one multiplier 35 is connected to the output line from the switch 33 and the remaining are connected to the output line from each of the delay elements 34 located in the even number stages. The first multipliers 35 multiply the switch 33 output and the outputs from these delay elements 35 by a filter coefficient h(2k). Also included are a plurality of second multipliers 36 connected to the output line from each of the delay elements 34 located in the odd number stages. The second multipliers 36 multiply the outputs of these delay elements 34 by a filter coefficient h(2k+1). The main filter circuit section described above allows the values obtained by adding and subtracting calculations on the first and the second input data Xa(n) and Xb(n) to be convoluted with the impulse responses.
A first total sum adder 37 sums up the outputs from all first multipliers 35 and outputs intermediate data An. On the other hand, a second total sum adder 38 sums up the outputs from all second multipliers 36 and outputs intermediate data Bn. A changeover switch 39 alternately switches between the intermediate data An and the intermediate data Bn in synchronization with the changeover switch 33 and outputs the output data Y(n). In this way, the filter circuit accomplishes the arithmetic operation in compliance with equations (11) and (12).
The Applicant previously proposed constructing the separation and synthesis filters described above by using the above-mentioned stored program method. The details of this proposal are disclosed in Japanese Patent Laid-Open Publications No. Hei 6-216715 and No. Hei 7-131295.
FIG. 13 is a block diagram showing the structure of an example known audio data compression/expansion apparatus that compresses audio data for sound recording operation and expands the compressed data read from a recording medium for sound reproducing operation.
When sound recording operation, that is, data compression, is executed, an attenuator 41, a digital filter 42, a Modified Discrete Cosine Transformation (MDCT) circuit 43, and a quantization circuit 44 operate to generate compressed data by compressing audio data that is input to the attenuator 41.
The attenuator 41 receives audio data consisting of A/D converted audio signals and attenuates the audio data as required. The digital filter 42, which is, for example, a QMF shown in FIG. 11, separates the audio data which has been input to it via the attenuator 41 into data components in their specific frequency bands, thus generating a plurality of band data. The MDCT circuit 43 executes discrete cosine transformation of the band data which has been input to it from the digital filter 42, thus generating coefficient data corresponding to each band data. Then, the quantization circuit 44 quantizes the coefficient data which has been input to it from the MDCT circuit 43 in accordance with a predetermined quantization table, thus generating compressed data. The MDCT 43 and quantization 44 circuits normally carry out the arithmetic for a plurality of band data on a time-sharing basis.
When sound reproducing operation, that is, data expansion, is executed, an inverse quantization circuit 45, an Inverse Modified Discrete Cosine Transformation (IMDCT) circuit 46, a digital filter 47, and an attenuator 48 operate to reproduce audio data by expanding the compressed data read from a given recording medium. The inverse quantization circuit 45 generates coefficient data corresponding to the coefficient data generated by the MDCT circuit 43, referring to the same quantization table as used by the quantization circuit 44 in the data compression system. The IMDCT circuit 46 executes inverse transformation, which inverts the transformation made by the MDCT circuit 43, and generates band data corresponding to the band data generated by the digital filter 42. The digital filter 47, which may be, for example, a QMF shown in FIG. 12, synthesizes the band data existing in separate frequency bands, input to it from the IMDCT circuit 46, into audio data. Then, the attenuator 48 attenuates, as required, the audio data which has been input to it from the digital filter 47 and supplies the data to a circuit in the subsequent stage which includes a D/A converter and a amplifier. The inverse quantization 45 and IMDCT 46 circuits carry out the arithmetic for a plurality of band data on a time-sharing basis, as do the MDCT 43 and quantization 44 circuits. Thus, a plurality of band data inputs to the digital filter 47 occur on a time-sharing basis.
A digital audio device that enables audio sound recording and reproducing, such as a mini-disc (MD) player, has both data compression and data expansion system circuits installed in parallel as shown in FIG. 13; the data compression system circuitry includes the components from the attenuator 41 up to the quantization circuit 44 and the data expansion system circuitry includes the components from the inverse quantization circuit 45 up to the attenuator 48. Since multipliers are normally used to handle digital data in the attenuators 41 and 48 and the digital filters 42 and 47, there arises a problem that the entire circuit size increases as the number of bits of data to be processed increases. The increase of the circuit size causes the circuit to consume more electric power, which results in the increase of cost.
An object of the present invention is to decrease the entire circuit size of an audio data compression/expansion apparatus that enables audio data sound recording and reproducing.
According to the audio data compression/expansion apparatus circuitry offered by the invention, a single digital filter is designed to operate so as to switch over between processing audio data separation and processing band data synthesis and a single attenuator is thus adequate to attenuate audio data that is input to and output from the digital filter.
According to the digital filter offered by the invention, the processing executed by a multiplier and an accumulator and the processing executed by an adder-subtracter are switched over by selector switchover. This allows the digital filter to switch over between processing audio data separation and processing band data synthesis. The multiplier that multiplies audio data by a filter coefficient is also used to multiply audio data by an attenuation coefficient. Thus, one multiplier can serve as a component of the digital filter and a component of the attenuator.